<?php

if (!defined('BASEPATH'))
    exit('No direct script access allowed');

class Other extends CI_Controller {

    public function Other() {
        parent::__construct();
        //$this -> load -> model('admin_model');
        $this->load->model('user_model');
        $this->load->library('administrator_authenticate');
    }

    public function view() {
        $this->administrator_authenticate->check_login();
        $data['content'] = 'other_view';
        $data['header'] = 'ការគ្រប់គ្រងទូទៅ';
        $data['jquery_ui'] = '';
        $data['jquery_dialog'] = '';
        $this->load->view('admin_template', $data);
    }

    public function add_official_function() {
        $this->load->model('official_function_model');
        $this->administrator_authenticate->check_login();
        $return = array();

        //get and clean posted data
        if (isset($_POST['official-order-submit'])) {
            //some data posted to here
            //check is the official order already exist
            $this->Official_function_model->checkExistingOfficialNumber($_POST['officialno']);
        }
    }

}